package org.vincen.helloworld.rubbish;

import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.Map;
import java.util.Queue;

public class R20130711 {
	
	public static void main(String[] args) {
		Queue<Integer> queue = new LinkedList<Integer>();
		queue.add(1);
		queue.add(2);
		queue.add(3);
		Iterator<Integer> i = queue.iterator();
		while (i.hasNext()){
			System.out.println(queue.poll());
		}
		
		
		//--------------------------------------
		LinkedHashSet<String> lhs = new LinkedHashSet<String>();
		lhs.add("abc");
		lhs.add("abc");
		System.out.println(lhs.size());
		
		//---------------------------------------
		Map<String, Boolean> map = new HashMap<String, Boolean>();
		map.put("abc", true);
		map.put("abc", false);
		System.out.println(map.size());
		System.out.println(map.get("abc"));
		
		//----------------------------------------
		Object[] objects = new Object[5];
		Integer i1 = new Integer(1);
		Integer i2 = new Integer(2);
		objects[0] = i1;
		objects[1] = i2;
		objects[0] = null;
		System.out.println(objects[0]);
	}
	
}
